<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>附件管理</title>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#inputForm").validate({
				submitHandler: function (form) {
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorClass: 'validation-invalid-label',
				highlight: function(element, errorClass) {
						$(element).removeClass(errorClass);
				},
				errorPlacement: function (error, element) {
					validateErrorPlacement(error, element);
				}
			});
		});
	</script>
</head>
<body>
<div class="content">
	<div class="card">
		<div class="card-body">
			<form:form id="inputForm" method="post"
					   modelAttribute="sysFile"
					   action="${ctxAdmin}/sys/sysFile/save" >
			<form:hidden path="id"/>
			<sys:message content="${message}"/>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">宿主表ID</label>
				<div class="col-sm-8">
					<form:input path="hostId" htmlEscape="false" maxlength="64" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">宿主表IDS</label>
				<div class="col-sm-8">
					<form:input path="hostIds" htmlEscape="false" maxlength="2000" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">宿主表名称</label>
				<div class="col-sm-8">
					<form:input path="hostTable" htmlEscape="false" maxlength="255" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label"><span class="text-danger">*</span>文件名称</label>
				<div class="col-sm-8">
					<form:input path="fileName" htmlEscape="false" maxlength="255" class="form-control required"/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">文件描述</label>
				<div class="col-sm-8">
					<form:input path="fileDesc" htmlEscape="false" maxlength="255" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label"><span class="text-danger">*</span>文件路径</label>
				<div class="col-sm-8">
					<form:input path="filePath" htmlEscape="false" maxlength="255" class="form-control required"/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">文件类型</label>
				<div class="col-sm-8">
					<form:input path="fileExt" htmlEscape="false" maxlength="255" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">文件大小</label>
				<div class="col-sm-8">
					<form:input path="fileSize" htmlEscape="false" maxlength="255" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">目标日期</label>
				<div class="col-sm-8">
					<input name="targetDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate "
						value="<fmt:formatDate value="${sysFile.targetDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">排序</label>
				<div class="col-sm-8">
					<form:input path="sort" htmlEscape="false" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-3 col-form-label">备注</label>
				<div class="col-sm-8">
					<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
				</div>
			</div>
			<div class="form-group row">
				<div class="col-sm-9 ml-auto">
					<shiro:hasPermission name="sys:menu:edit">
						<button type="submit" class="btn btn-primary"><i class="icon-database-check mr-2"></i>保 存</button>
					</shiro:hasPermission>
					<button type="button" class="btn btn-light" onclick="cancelSelect()" ><i class="icon-database-arrow mr-2"></i>取 消</button>
				</div>
			</div>
		</form:form>
		</div>
	</div>
</div>
</body>
</html>